#ifndef _V_ACCOUNT_DATA_BASE_
#define _V_ACCOUNT_DATA_BASE_

#include <QList>
#include <QString>
#include "vuser.h"

class QSqlDatabase;

class VAccountDataBase 
{
public:
	static VAccountDataBase* instance();
	~VAccountDataBase();
	VUsers registAccount(const QString& account, const QString& password);//注册账户
	VUsers verifyAccount(const QString& account, const QString& password);//验证账户
	void changePassword(const QString& account, const QString& newPassword);
private:
	VAccountDataBase();
	VAccountDataBase(const VAccountDataBase&) = delete;//禁用拷贝构造
	VAccountDataBase(VAccountDataBase&&) = delete;//禁用移动构造
	
	QSqlDatabase& m_accountDatabase;
};

#endif
